package stra

import (
	"fmt"
	"time"

	"github.com/didi/nightingale/src/models"
	"github.com/didi/nightingale/src/modules/agent/config"
)

func NewCheckCollect(name, comment, ctype, cron string, modTime time.Time) *models.CheckCollect {
	return &models.CheckCollect{
		CollectType: "check",
		Name:        name,
		Comment:     comment,
		Ctype:       ctype,
		Cron:        cron,
		LastUpdated: modTime,
	}
}

func GetCheckCollects() map[string]*models.CheckCollect {
	checks := make(map[string]*models.CheckCollect)

	if config.Config.Stra.Enable {
		checks = Collect.GetCheck()
	}

	return checks
}

func parseCheckInfo(fname string) (name, comment, cron, ctype string, err error) {
	fmt.Println("fname is:", fname)
	return
}
